package pipeline

import "net/http"

type HttpHandlerDecorator func(handlerFunc http.HandlerFunc) http.HandlerFunc
//
func Handler(h http.HandlerFunc, decors ...HttpHandlerDecorator) http.HandlerFunc {
	for i := range decors {
		d := decors[len(decors)-1-i]
		h = d(h)
	}
	return h
}
